package com.sakura.taos.tool.manipulator.model.MyEnum;

/**
 *  taos 关键字
 * 这些关键字无论大小写均不可以用作库名、表名、STable名、数据列名及标签列名等
 *  @Author: 贺坤
 *  @Date: 2021/2/5 14:40
 */
public enum KeyWord {
    ABLOCKS("ABLOCKS"),
    ABORT("ABORT"),
    ACCOUNT("ACCOUNT"),
    ACCOUNTS("ACCOUNTS"),
    ADD("ADD"),
    AFTER("AFTER"),
    ALL("ALL"),
    ALTER("ALTER"),
    AND("AND"),
    AS("AS"),
    ASC("ASC"),
    ATTACH("ATTACH"),
    AVG("AVG"),
    BEFORE("BEFORE"),
    BEGIN("BEGIN"),
    BETWEEN("BETWEEN"),
    BIGINT("BIGINT"),
    BINARY("BINARY"),
    BITAND("BITAND"),
    BITNOT("BITNOT"),
    BITOR("BITOR"),
    BOOL("BOOL"),
    BOTTOM("BOTTOM"),
    BY("BY"),
    CACHE("CACHE"),
    CASCADE("CASCADE"),
    CHANGE("CHANGE"),
    CLOG("CLOG"),
    CLUSTER("CLUSTER"),
    COLON("COLON"),
    COLUMN("COLUMN"),
    COMMA("COMMA"),
    COMP("COMP"),
    CONCAT("CONCAT"),
    CONFIGS("CONFIGS"),
    CONFLICT("CONFLICT"),
    CONNECTION("CONNECTION"),
    CONNECTIONS("CONNECTIONS"),
    COPY("COPY"),
    COUNT("COUNT"),
    CREATE("CREATE"),
    CTIME("CTIME"),
    DATABASE("DATABASE"),
    DATABASES("DATABASES"),
    DAYS("DAYS"),
    DEFERRED("DEFERRED"),
    DELIMITERS("DELIMITERS"),
    DESC("DESC"),
    DESCRIBE("DESCRIBE"),
    DETACH("DETACH"),
    DIFF("DIFF"),
    DISTINCT("DISTINCT"),
    DIVIDE("DIVIDE"),
    DNODE("DNODE"),
    DNODES("DNODES"),
    DOT("DOT"),
    DOUBLE("DOUBLE"),
    DROP("DROP"),
    EACH("EACH"),
    END("END"),
    EQ("EQ"),
    EXISTS("EXISTS"),
    EXPLAIN("EXPLAIN"),
    FAIL("FAIL"),
    FILL("FILL"),
    FIRST("FIRST"),
    FLOAT("FLOAT"),
    FOR("FOR"),
    FROM("FROM"),
    GE("GE"),
    GLOB("GLOB"),
    GRANTS("GRANTS"),
    GROUP("GROUP"),
    GT("GT"),
    ID("ID"),
    IF("IF"),
    IGNORE("IGNORE"),
    IMMEDIATE("IMMEDIATE"),
    IMPORT("IMPORT"),
    IN("IN"),
    INITIALLY("INITIALLY"),
    INSERT("INSERT"),
    INSTEAD("INSTEAD"),
    INTEGER("INTEGER"),
    INTERVAL("INTERVAL"),
    INTO("INTO"),
    IP("IP"),
    IS("IS"),
    ISNULL("ISNULL"),
    JOIN("JOIN"),
    KEEP("KEEP"),
    KEY("KEY"),
    KILL("KILL"),
    LAST("LAST"),
    LE("LE"),
    LEASTSQUARES("LEASTSQUARES"),
    LIKE("LIKE"),
    LIMIT("LIMIT"),
    LINEAR("LINEAR"),
    LOCAL("LOCAL"),
    LP("LP"),
    LSHIFT("LSHIFT"),
    LT("LT"),
    MATCH("MATCH"),
    MAX("MAX"),
    METRIC("METRIC"),
    METRICS("METRICS"),
    MIN("MIN"),
    MINUS("MINUS"),
    MNODES("MNODES"),
    MODULES("MODULES"),
    NCHAR("NCHAR"),
    NE("NE"),
    NONE("NONE"),
    NOT("NOT"),
    NOTNULL("NOTNULL"),
    NOW("NOW"),
    OF("OF"),
    OFFSET("OFFSET"),
    OR("OR"),
    ORDER("ORDER"),
    PASS("PASS"),
    PERCENTILE("PERCENTILE"),
    PLUS("PLUS"),
    PRAGMA("PRAGMA"),
    PREV("PREV"),
    PRIVILEGE("PRIVILEGE"),
    QUERIES("QUERIES"),
    QUERY("QUERY"),
    RAISE("RAISE"),
    REM("REM"),
    REPLACE("REPLACE"),
    REPLICA("REPLICA"),
    RESET("RESET"),
    RESTRICT("RESTRICT"),
    ROW("ROW"),
    ROWS("ROWS"),
    RP("RP"),
    RSHIFT("RSHIFT"),
    SCORES("SCORES"),
    SELECT("SELECT"),
    SEMI("SEMI"),
    SET("SET"),
    SHOW("SHOW"),
    SLASH("SLASH"),
    SLIDING("SLIDING"),
    SMALLINT("SMALLINT"),
    SPREAD("SPREAD"),
    STABLE("STABLE"),
    STABLES("STABLES"),
    STAR("STAR"),
    STATEMENT("STATEMENT"),
    STDDEV("STDDEV"),
    STREAM("STREAM"),
    STREAMS("STREAMS"),
    STRING("STRING"),
    SUM("SUM"),
    TABLE("TABLE"),
    TABLES("TABLES"),
    TAG("TAG"),
    TAGS("TAGS"),
    TBLOCKS("TBLOCKS"),
    TBNAME("TBNAME"),
    TIMES("TIMES"),
    TIMESTAMP("TIMESTAMP"),
    TINYINT("TINYINT"),
    TOP("TOP"),
    TRIGGER("TRIGGER"),
    UMINUS("UMINUS"),
    UPLUS("UPLUS"),
    USE("USE"),
    USER("USER"),
    USERS("USERS"),
    USING("USING"),
    VALUES("VALUES"),
    VARIABLE("VARIABLE"),
    VGROUPS("VGROUPS"),
    VIEW("VIEW"),
    WAVG("WAVG"),
    WHERE("WHERE");
    // 成员变量
    private String value;

    private KeyWord(String value) {
        this.value = value;
    }
    // 普通方法
    public static Boolean existence(String value) {
        for (KeyWord keyWord : KeyWord.values()) {
            if (keyWord.getValue().equalsIgnoreCase(value)) {
                return true;
            }
        }
        return false;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
